﻿// owner 蒋家伟

#pragma once

#include "WeakReference.h"
#include "CommonWidget_home.h"

class QWidget;
namespace jsdk
{
    class COMMONWIDGET_EXPORT IStorageWidget : public WeakReference
    {
    public:
        /// \ brief 创建一个内存管理窗口
        /// \ in rootFilePath 根目录
        /// \ in isOnlyDisplayDir 是否仅显示文件夹
        static OwnerPtr<IStorageWidget> create(const std::wstring& rootFilePath, bool isOnlyDisplayDir);

        /// \ brief 显示窗口
        virtual void show() = 0;

        /// \brief 获取Qt窗口对象
        virtual const QWidget* getQWidget() const = 0;

        /// \ brief 获取Qt窗口对象
        virtual QWidget* getQWidget() = 0;
    };
}
